
package com.jf.cloud.common.security.config;

import com.jf.cloud.common.constant.Auth;
import com.jf.cloud.common.security.adapter.AuthConfigAdapter;

import java.util.HashSet;

/**
 * @author zz
 * @date 2021/8/6 14:32
 */
public class SensitiveWordConfig {

    private static final String SAVE_SENSITIVE_WORD = "/p/sys_config/save/";
    private static final String FEIGN_URL = "/feign/**";

    static final HashSet<String> SENSITIVE_WHITE_SET;
    static {
        SENSITIVE_WHITE_SET = new HashSet<>();
        SENSITIVE_WHITE_SET.add(Auth.CHECK_TOKEN_URI);
        SENSITIVE_WHITE_SET.add(Auth.CHECK_RBAC_URI);
        SENSITIVE_WHITE_SET.add(AuthConfigAdapter.DOC_URI);
        SENSITIVE_WHITE_SET.add(SAVE_SENSITIVE_WORD);
        SENSITIVE_WHITE_SET.add(FEIGN_URL);
    }

    private SensitiveWordConfig() {

    }

    public static HashSet<String> getSensitiveWhiteSet() {
        return SENSITIVE_WHITE_SET;
    }
}
